\(\int \frac {2-x-2 x^2+x^3}{(4-5 x^2+x^4)^2} \, dx\) [85]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 26, antiderivative size = 46 \[ \int \frac {2-x-2 x^2+x^3}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{12 (2+x)}-\frac {1}{18} \log (1-x)+\frac {1}{48} \log (2-x)+\frac {1}{6} \log (1+x)-\frac {19}{144} \log (2+x) \]

[Out]

1/12/(2+x)-1/18*ln(1-x)+1/48*ln(2-x)+1/6*ln(1+x)-19/144*ln(2+x)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {1600, 2099} \[ \int \frac {2-x-2 x^2+x^3}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{12 (x+2)}-\frac {1}{18} \log (1-x)+\frac {1}{48} \log (2-x)+\frac {1}{6} \log (x+1)-\frac {19}{144} \log (x+2) \]

[In]

Int[(2 - x - 2*x^2 + x^3)/(4 - 5*x^2 + x^4)^2,x]

[Out]

1/(12*(2 + x)) - Log[1 - x]/18 + Log[2 - x]/48 + Log[1 + x]/6 - (19*Log[2 + x])/144

Rule 1600

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

Rule 2099

Int[(P_)^(p_)*(Q_)^(q_.), x_Symbol] :> With[{PP = Factor[P]}, Int[ExpandIntegrand[PP^p*Q^q, x], x] /;  !SumQ[N
onfreeFactors[PP, x]]] /; FreeQ[q, x] && PolyQ[P, x] && PolyQ[Q, x] && IntegerQ[p] && NeQ[P, x]

Rubi steps \begin{align*} \text {integral}& = \int \frac {1}{(2+x)^2 \left (2-x-2 x^2+x^3\right )} \, dx \\ & = \int \left (\frac {1}{48 (-2+x)}-\frac {1}{18 (-1+x)}+\frac {1}{6 (1+x)}-\frac {1}{12 (2+x)^2}-\frac {19}{144 (2+x)}\right ) \, dx \\ & = \frac {1}{12 (2+x)}-\frac {1}{18} \log (1-x)+\frac {1}{48} \log (2-x)+\frac {1}{6} \log (1+x)-\frac {19}{144} \log (2+x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.91 \[ \int \frac {2-x-2 x^2+x^3}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{144} \left (\frac {12}{2+x}+24 \log (-1-x)-8 \log (1-x)+3 \log (2-x)-19 \log (2+x)\right ) \]

[In]

Integrate[(2 - x - 2*x^2 + x^3)/(4 - 5*x^2 + x^4)^2,x]

[Out]

(12/(2 + x) + 24*Log[-1 - x] - 8*Log[1 - x] + 3*Log[2 - x] - 19*Log[2 + x])/144

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.72

method result size
default \(\frac {1}{12 x +24}-\frac {19 \ln \left (x +2\right )}{144}+\frac {\ln \left (x +1\right )}{6}-\frac {\ln \left (x -1\right )}{18}+\frac {\ln \left (x -2\right )}{48}\) \(33\)
risch \(\frac {1}{12 x +24}-\frac {19 \ln \left (x +2\right )}{144}+\frac {\ln \left (x +1\right )}{6}-\frac {\ln \left (x -1\right )}{18}+\frac {\ln \left (x -2\right )}{48}\) \(33\)
norman \(\frac {-\frac {1}{6} x^{2}-\frac {1}{12} x +\frac {1}{12} x^{3}+\frac {1}{6}}{x^{4}-5 x^{2}+4}+\frac {\ln \left (x -2\right )}{48}-\frac {\ln \left (x -1\right )}{18}+\frac {\ln \left (x +1\right )}{6}-\frac {19 \ln \left (x +2\right )}{144}\) \(54\)
parallelrisch \(\frac {3 \ln \left (x -2\right ) x -8 \ln \left (x -1\right ) x +24 \ln \left (x +1\right ) x -19 \ln \left (x +2\right ) x +12+6 \ln \left (x -2\right )-16 \ln \left (x -1\right )+48 \ln \left (x +1\right )-38 \ln \left (x +2\right )}{144 x +288}\) \(62\)

[In]

int((x^3-2*x^2-x+2)/(x^4-5*x^2+4)^2,x,method=_RETURNVERBOSE)

[Out]

1/12/(x+2)-19/144*ln(x+2)+1/6*ln(x+1)-1/18*ln(x-1)+1/48*ln(x-2)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.98 \[ \int \frac {2-x-2 x^2+x^3}{\left (4-5 x^2+x^4\right )^2} \, dx=-\frac {19 \, {\left (x + 2\right )} \log \left (x + 2\right ) - 24 \, {\left (x + 2\right )} \log \left (x + 1\right ) + 8 \, {\left (x + 2\right )} \log \left (x - 1\right ) - 3 \, {\left (x + 2\right )} \log \left (x - 2\right ) - 12}{144 \, {\left (x + 2\right )}} \]

[In]

integrate((x^3-2*x^2-x+2)/(x^4-5*x^2+4)^2,x, algorithm="fricas")

[Out]

-1/144*(19*(x + 2)*log(x + 2) - 24*(x + 2)*log(x + 1) + 8*(x + 2)*log(x - 1) - 3*(x + 2)*log(x - 2) - 12)/(x +
 2)

Sympy [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.74 \[ \int \frac {2-x-2 x^2+x^3}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {\log {\left (x - 2 \right )}}{48} - \frac {\log {\left (x - 1 \right )}}{18} + \frac {\log {\left (x + 1 \right )}}{6} - \frac {19 \log {\left (x + 2 \right )}}{144} + \frac {1}{12 x + 24} \]

[In]

integrate((x**3-2*x**2-x+2)/(x**4-5*x**2+4)**2,x)

[Out]

log(x - 2)/48 - log(x - 1)/18 + log(x + 1)/6 - 19*log(x + 2)/144 + 1/(12*x + 24)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.70 \[ \int \frac {2-x-2 x^2+x^3}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{12 \, {\left (x + 2\right )}} - \frac {19}{144} \, \log \left (x + 2\right ) + \frac {1}{6} \, \log \left (x + 1\right ) - \frac {1}{18} \, \log \left (x - 1\right ) + \frac {1}{48} \, \log \left (x - 2\right ) \]

[In]

integrate((x^3-2*x^2-x+2)/(x^4-5*x^2+4)^2,x, algorithm="maxima")

[Out]

1/12/(x + 2) - 19/144*log(x + 2) + 1/6*log(x + 1) - 1/18*log(x - 1) + 1/48*log(x - 2)

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.78 \[ \int \frac {2-x-2 x^2+x^3}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{12 \, {\left (x + 2\right )}} - \frac {19}{144} \, \log \left ({\left | x + 2 \right |}\right ) + \frac {1}{6} \, \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{18} \, \log \left ({\left | x - 1 \right |}\right ) + \frac {1}{48} \, \log \left ({\left | x - 2 \right |}\right ) \]

[In]

integrate((x^3-2*x^2-x+2)/(x^4-5*x^2+4)^2,x, algorithm="giac")

[Out]

1/12/(x + 2) - 19/144*log(abs(x + 2)) + 1/6*log(abs(x + 1)) - 1/18*log(abs(x - 1)) + 1/48*log(abs(x - 2))

Mupad [B] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.70 \[ \int \frac {2-x-2 x^2+x^3}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {\ln \left (x+1\right )}{6}-\frac {\ln \left (x-1\right )}{18}+\frac {\ln \left (x-2\right )}{48}-\frac {19\,\ln \left (x+2\right )}{144}+\frac {1}{12\,\left (x+2\right )} \]

[In]

int(-(x + 2*x^2 - x^3 - 2)/(x^4 - 5*x^2 + 4)^2,x)

[Out]

log(x + 1)/6 - log(x - 1)/18 + log(x - 2)/48 - (19*log(x + 2))/144 + 1/(12*(x + 2))